Skip to content

Open standalone markdown files, telemetry on by default, fix CPU spin - #6

Merged
PermutationResearch merged 4 commits into
mainfrom
feat/standalone-markdown-viewer
Jul 10, 2026
Merged

Open standalone markdown files, telemetry on by default, fix CPU spin#6
PermutationResearch merged 4 commits into
mainfrom
feat/standalone-markdown-viewer

Conversation

@PermutationResearch

Copy link
Copy Markdown
Owner

Summary

  • Standalone markdown: declares .md/.markdown document types (Viewer role, Alternate rank) so Finder's "Open With" offers Loci; file URLs open in a dedicated viewer window that reads the file in place — no library import unless the user clicks the new Add to Library toolbar action
  • Rendered markdown: the viewer now renders markdown as formatted text (headings, lists, quotes, code fences, YAML frontmatter as code, [[wikilinks]] shown by title) instead of raw monospace — applies to library markdown items too
  • Telemetry on by default: anonymous analytics default to enabled; explicit user choices (current or legacy key) still win and the Settings → Privacy toggle remains the opt-out
  • CPU spin fix: ScrollFeelProbeView re-queued itself forever when detached from a scroll view, pegging the app at 100% CPU and starving the event loop; retries are now bounded and stop when the probe leaves the window

Testing

  • swift build -c release clean; swift test 23/23 passing
  • Packaged app verified: open -a Loci standalone-test.md opens a 780×660 viewer window alongside the main window, frontmatter/headings/lists/code render formatted, process idles at 0% CPU

🤖 Generated with Claude Code

arnaudbellemare and others added 4 commits July 10, 2026 13:03
configureScrollView rescheduled itself unconditionally whenever the
probe had no enclosing scroll view, so a detached probe re-queued
itself forever and pegged the app at 100% CPU, starving the event
loop until even quit stopped working. Bail out when the probe has no
window (reattachment reschedules via viewDidMoveToWindow) and cap
lookup retries at 40 spaced 50ms apart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Declare .md/.markdown document types so Finder offers Loci as a
viewer, route incoming file URLs to a per-file viewer window that
reads the file in place, and surface an Add to Library toolbar action
for when the user does want a copy imported. Markdown now renders as
formatted text (headings, lists, quotes, fences, wikilink titles) on
the viewer canvas instead of raw monospace, for library items too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Anonymous analytics now default on; an explicit choice under the
current or legacy defaults key still wins, and the Settings privacy
toggle keeps working as the opt-out.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The standalone markdown window drew the app-wide light titlebar over
the viewer's dark canvas; give it a darkAqua appearance and matching
background. The zoom and ellipsis menus use the borderless-button
style, which greedily absorbs free width in wide windows and strands
their dropdown chevrons at the trailing edge — fix them at their
content size.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PermutationResearch
PermutationResearch merged commit bc9365d into main Jul 10, 2026
1 check passed
@PermutationResearch
PermutationResearch deleted the feat/standalone-markdown-viewer branch July 10, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants